﻿@model IEnumerable<Stardust.Models.TipoHabitacionBean>

@{
    ViewBag.Title = "Tipos de habitación";
}

@if (!String.IsNullOrEmpty(ViewBag.results)) { 
    <div class="nNote nWarning hideit">
        <p><strong>AVISO: </strong>@ViewBag.results</p>
    </div>
}

<h2>Tipos de habitación</h2>

<p>
    <a href="@Url.Action("Create")"><img src="@Url.Content("~/Content/images/icons/color/plus.png")" alt="Create" />Añadir tipo de habitación</a>
</p>

<div class="wrapper">
    <div class="widget">
        <div class="title"><h6>Tipos de habitación</h6></div>
        <div class="dataTables_wrapper">
            <table cellpadding = "0" cellspacing = "0" width = "100%" class = "display dTable">
                <thead>
                    <tr>
                        <th class="ui-state-default" rowspan="1" colspan="1" style="width:170px;" >
                            <div class="DataTables_sort_wrapper">
                            Nombre
                            <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                            </div>
                        </th>
                        <th class="ui-state-default" rowspan="1" colspan="1" style="width:170px;" >
                            <div class="DataTables_sort_wrapper">
                            Descripción
                            <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                            </div>
                        </th>
                        <th class="ui-state-default" rowspan="1" colspan="1" style="width:170px;" >
                            <div class="DataTables_sort_wrapper">
                            Opciones
                            <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                            </div>
                        </th>
                </thead>
                <tbody>
                @foreach (var item in Model) {
                    <tr class="gradeA odd">
                        <td>@Html.DisplayFor(modelItem => item.nombre )</td>
                        <td>@Html.DisplayFor(modelItem => item.descripcion )</td>
                        <td>
                            <a href="@Url.Action("Edit", new { id = item.ID })"><img src="@Url.Content("~/Content/images/icons/color/pencil.png")" alt="Edit" />Editar </a> | 
                            <a href="@Url.Action("Details", new { id = item.ID })"><img src="@Url.Content("~/Content/images/icons/color/edit-column.png")" alt="Details" />Detalles</a> | 
                            <a id = @item.ID class = "eliminar" href = "" ><img src="@Url.Content("~/Content/images/icons/color/cross.png")" alt="Delete" />Borrar</a>
                        </td>
                    </tr>        
                }
                </tbody>
            </table>
        </div>
    </div>
</div>
